<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>{$pagetitle}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/static/admin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/static/admin/style/global.css" media="all">
</head>
<body>

<form action="{:url()}" class="layui-form" method="post" lay-filter="component-form-element" onsubmit="return save_form2(this)">
	<input type="hidden" name="sort" value="{$sort}">
	<input type="hidden" name="pubid" value="{$pubid}">
	
	<div class="layui-card">
	  <div class="layui-card-body">
		<div class="layui-tab layui-tab-card">
		<ul class="layui-tab-title">
			<li class="layui-this">基本设置</li>
			<li>模板设置</li>
			<li>SEO设置</li>
			<li>权限设置</li>
			{if $ModelModel['cat_is_enter']}
				<li>自定义字段</li>
			{/if}
		</ul>
		<div class="layui-tab-content">
		  <div class="layui-tab-item layui-show">

				<div class="layui-form-item">
				  <label class="layui-form-label">栏目模型</label>
				  <div class="layui-input-inline">
                        <select style="width:200px" name="modelid" class="select2" lay-ignore onchange="urlgo(this)">
                            <option value="">请选择栏目模型</option>
                            {foreach $modeList as $v}
                                <option value="{$v.modelid}" {$modelid==$v['modelid']?'selected':''}>{$v.name}</option>
                            {/foreach}
                        </select>
				  </div>
				</div>
				<div class="layui-form-item">
				  <label class="layui-form-label">父级</label>
				  <div class="layui-input-inline">
					<select style="width:200px" name="pid" class="select2" lay-ignore><option value="">顶级栏目</option>{$cat|raw}</select>
				  </div>
				</div>
				<div class="layui-form-item">
				  <label class="layui-form-label">栏目名称</label>
				  <div class="layui-input-inline">
					<input type="text" name='name' autocomplete="off"  class="layui-input">
				  </div>
				</div>		
				<div class="layui-form-item">
				  <label class="layui-form-label">栏目路径<span>仅支持：英文，字母，下划线</span></label>
				  <div class="layui-input-inline">
					<input type="text" name='classpath' value="{$classpath}" autocomplete="off" class="layui-input">
				  </div>
				</div>		
                                <div class="layui-form-item">
                                  <label class="layui-form-label">缩略图<span></span></label>
                                  <div class="layui-input-inline file-upload">
                                                <input type="text" name="thumb" id="info_thumb" value="" autocomplete="off" class="layui-input"/>
                                                <div class="layui-btn-group">
                                                        <button type="button" class="layui-btn" onclick="previewImg('info_thumb')"><i class="layui-icon">&#xe64a;</i>预览</button>
                                                        <button type="button" class="layui-btn fastupimg" data-input_id="info_thumb" data-listtype="img" id="info_thumb_Picker"><i class="layui-icon">&#xe608;</i>上传</button>
                                                        <button type="button" class="layui-btn" onClick="selectfile('info_thumb','','img')"><i class="layui-icon">&#xe67c;</i>浏览</button>
                                                </div>
                                  </div>
                                </div>	
				<div class="layui-form-item">
				  <label class="layui-form-label">显示</label>
				  <div class="layui-input-inline">
					<input type="checkbox" value="1" name="status" lay-skin="switch" lay-text="显示|隐藏"  checked>
				  </div>
				</div>	
				<div class="layui-form-item">
				  <label class="layui-form-label">每页显示</label>
				  <div class="layui-input-inline select">
					<input type="text" name="lencord" value="20"  autocomplete="off" class="layui-input"/>条				
				  </div>
				</div>	                      
				<div class="layui-form-item">
				  <label class="layui-form-label">前台排序方式</label>
				  <div class="layui-input-inline select">
					<input type="text" name="listorder" value="{:array_search('默认排序',$orderInc)}" autocomplete="off" class="layui-input"/>
					<select onchange="update_order(this,'listorder')" lay-ignore >
						{foreach $orderInc as $k=>$v}
							<option value="{$k}">{$v}</option>
						{/foreach}
					</select>					
				  </div>
				</div>						
				<div class="layui-form-item">
				  <label class="layui-form-label">后台排序方式</label>
				  <div class="layui-input-inline select">
					<input type="text" name="reorder" value="{:array_search('默认排序',$orderInc)}" autocomplete="off" class="layui-input"/>
					<select onchange="update_order(this,'reorder')" lay-ignore>
						{foreach $orderInc as $k=>$v}
							<option value="{$k}">{$v}</option>
						{/foreach}
					</select>	
				  </div>
				</div>									
		  </div>
		  <div class="layui-tab-item">

				<div class="layui-form-item">
				  <label class="layui-form-label">列表模板</label>
				  <div class="layui-input-inline">
                        <select name="listtemp" class="layui-input">
                            <option value="">请选择列表模板</option>
                            {foreach $listtemp as $v}
                                <option value="<?=$v['template_id']?>" <?=$v['template_id']==$parentinfo['listtemp']?'selected':''?>><?=$v['name']?></option>
                            {/foreach}
                        </select>
				  </div>
				</div>

				<div class="layui-form-item">
				  <label class="layui-form-label">内容模板</label>
				  <div class="layui-input-inline">
                        <select name="viewtemp" class="layui-input">
                            <option value="">请选择内容模板</option>
                            {foreach $viewtemp as $v}
                                <option value="<?=$v['template_id']?>" <?=$v['template_id']==$parentinfo['viewtemp']?'selected':''?>><?=$v['name']?></option>
                            {/foreach}
                        </select>
				  </div>
				</div>		
				  
			  
		  </div>
		  <div class="layui-tab-item">

				<div class="layui-form-item">
				  <label class="layui-form-label">SEO标题</label>
				  <div class="layui-input-inline">
					<input type="text"  name='pagetitle' placeholder="不填写默认调用标题" autocomplete="off" class="layui-input">
				  </div>
				</div>	
				<div class="layui-form-item">
				  <label class="layui-form-label">SEO关键字</label>
				  <div class="layui-input-inline">
					<input type="text"  name='keywords' placeholder="多个用半角的逗号隔开" autocomplete="off" class="layui-input">
				  </div>
				</div>	
				<div class="layui-form-item">
				  <label class="layui-form-label">SEO描述信息</label>
				  <div class="layui-input-inline">
					<textarea name='description' autocomplete="off" style="height: 200px;" class="layui-input"></textarea>
				  </div>
				</div>	

		  </div>
		  <div class="layui-tab-item">
			<div class="layui-form-item">
			  <label class="layui-form-label">角色权限</label>
			  <div class="layui-input-inline">


				<div class="widget-content nopadding" style="width:99%; ">
				  <table class="layui-table" style="border-right:1px solid #ccc">
					<thead>
					  <tr>
						<th style="width:5%">角色名称</th>              
						<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_view">查看权限</th>
						<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_add">增加权限</th>
						<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_editor">编辑权限</th>
						<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_delete">删除权限</th>
						<th style="width:6%;cursor:pointer; text-decoration: underline" class="thischeck_all" val="1" objname="info_checked">审核权限</th>
					  </tr>
					</thead>
					<tbody>
						{foreach $roleInc as $v}
							<tr>
								<td style="text-align: center;">{$v.name}</td>                                                             
								<td class="center"><input type="checkbox" lay-ignore name="view_role_{$v.id}" class="info_view" value="1" checked=""/></td>
								<td class="center"><input type="checkbox" lay-ignore name="add_role_{$v.id}" class="info_add" value="1" checked=""/></td>
								<td class="center"><input type="checkbox" lay-ignore name="editor_role_{$v.id}" class="info_editor" value="1" checked=""/></td>
								<td class="center"><input type="checkbox" lay-ignore name="delete_role_{$v.id}" class="info_delete" value="1" checked=""/></td>
								<td class="center"><input type="checkbox" lay-ignore name="checked_role_{$v.id}" class="info_checked" value="1" checked=""/></td>
							</tr>
						{/foreach}

					</tbody>
				  </table>
				</div>


			  </div>
			</div>	
					
				<div class="layui-form-item">
				  <label class="layui-form-label">会员组权限</label>
				  <div class="layui-input-inline">
                        <select style="width:500px" name="member_group_id[]" multiple="true" placeholder="可针对指定会员组访问" class="select2" lay-ignore>
                            {foreach $memberGroupInc as $v}
                                <option value="{$v.group_id}">{$v.name}</option>
                            {/foreach}
                        </select>（不勾选则针对所有人开放）
				  </div>
				</div>							  
						  
		  </div>
		  {if $ModelModel['cat_is_enter']}
			<div class="layui-tab-item"><?=think\facade\View::fetch($CatFormTemp)?></div>
		  {/if}
		</div>
	  </div>
	</div>	
	<div class="layui-form-item layui-layout-admin" style="margin-top: 30px;">
		<div class="layui-input-block">
		   <div class="layui-footer" style="left: 0;">
			  <button class="layui-btn" type="submit"  lay-filter="component-form-element">立即提交</button>
			  <button type="reset" class="layui-btn layui-btn-primary close">关闭</button>
		  </div>
		</div>
	</div>  
</form>
{include file="cat/js"}
</body>
</html>